import React, {Component} from 'react';
import {connect} from 'dva';
import style from './home.css';

import Search from '@/components/Search'; //搜索组件部分
import TableComponent from '@/components/TableComponent'; //表格组件部分

class Home extends Component {
  constructor (props) {
    super (props);

    this.state = {
      hhh: '1212',
    };
  }
  componentWillMount () {
    this.dispatch ('gData/getThisRoute', this.props.route.meta.thisRoute);
  }
  dispatch = (type, param) => {
    this.props.dispatch ({
      type,
      param,
    });
  };
  render () {
    return (
      <div className={style.home_container}>
        {/* <Search />
        <TableComponent /> */}
      </div>
    );
  }
}

const mapStateToProps = state => {
  return {
    gData: state.gData,
  };
};

export default connect (mapStateToProps) (Home);
